home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group94b.txt
/
000103_icon-group-sender _Thu Nov 10 21:30:12 1994.msg
< prev
next >
Wrap
Internet Message Format
|
1995-02-09
|
2KB
Received: by cheltenham.cs.arizona.edu; Fri, 11 Nov 1994 15:22:46 MST
To: icon-group-l@cs.arizona.edu
Date: 10 Nov 1994 21:30:12 -0700
From: dave@cs.arizona.edu (Dave Schaumann)
Message-Id: <39us0k$i35@caslon.CS.Arizona.EDU>
Organization: University of Arizona CS Department, Tucson AZ
Sender: icon-group-request@cs.arizona.edu
References: <Cz2Ewr.Kr@beaver.cs.washington.edu>
Subject: Re: Three Questions: Allocated, Memory, and C Functions/Porting to PC
Errors-To: icon-group-errors@cs.arizona.edu
In article <Cz2Ewr.Kr@beaver.cs.washington.edu>,
Gail Murphy <gmurphy@cs.washington.edu> wrote:
>
>1. Does anyone have any example programs using the &allocated keyword?
> From the documentation, I thought it would return 4 values, but
> I am only getting one on the DECstation and the Alpha using
> Icon 9.
Try this:
procedure main()
every write( &allocated )
end
It works for me.
>2. I have an Icon program that must process input character by character for
> tokenizing. This creates a lot of garbage, slowing things down considerably.
Are you reading in characters one at a time? If so, try reading in a
line at a time. I've done tokenizing (of Icon itself) that way. I
didn't check how bad garbage collection was, but the routine runs
tolerably fast.
>3. [...] Can C functions be linked in with the PC version?
I don't know the immediate answer to this quetion. I have looked at
the documentation for combining C functions with Icon programs, and
it looks like a lot of work (and probably over the head of the average
Icon novice). I would highly recommend looking hard for a solution within
Icon before bailing to C.
-Dave